package com.irdstudio.apicenter.console.service.appframe;

import java.sql.SQLException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.irdstudio.apicenter.console.dm.AppTradePrivate;
import com.irdstudio.apicenter.console.dm.AppTradePrivateDao;

@Service(value = "appFrameTradeService")
public class AppFrameTradeService {
	@Autowired
	private AppTradePrivateDao appTradePrivateDao;

	public int insertOne(AppTradePrivate appTradePrivate) throws SQLException,
			ClassNotFoundException {
		return appTradePrivateDao.insert(appTradePrivate);
	}

	public int delete(String tradeid) throws ClassNotFoundException,
			SQLException {
		return appTradePrivateDao.delete(tradeid);
	}

	public AppTradePrivate queryAppTradePrivate(String tradeId)
			throws SQLException {
		return appTradePrivateDao.queryWithKeys(tradeId);
	}

	public int update(AppTradePrivate appTradePrivate) throws SQLException,
			ClassNotFoundException {
		return appTradePrivateDao.update(appTradePrivate);
	}

}
